﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="goodsPromotionList.aspx.cs" Inherits="WebApp.admin.goods.goodsPromotionList" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1"><title>
	促销活动
</title><link href="../css/skin.css" rel="stylesheet" type="text/css" /></head>
<script type="text/javascript" src="../js/main.js"></script>
<script type="text/javascript" src="../js/jquery.min.js"></script>
<script type="text/javascript" src="../js/jquery.js"></script>

<body class="body">
    <table class="main" cellpadding="0" cellspacing="0">
        <tr>
            <td class="td_middle_middle">
                <div class="maincontent">
                    <input id="btnAddGoodsPromotion" type="button" style='display:<%=AddDisplay %>; float:left;' class="formButton" value="添加活动" onclick="location.href='goodsPromotion.aspx?ot=ad';" />
                    <form name="form1" runat="server" id="form1">

                        <table cellpadding="0" cellspacing="0">
                              <tr class="tr_title">
                                <td>
                                    <input name="chkall" value="1" type="checkbox" onclick="CheckAll(this,'Item')" title="全选/反选" />
                                </td>
                                <td>
                                    <span onclick="SetOrder('promotionTitle');">活动标题</span></td>
                                <td>
                                    <span onclick="SetOrder('promotionType');">活动类型</span></td>
                                <td>
                                    <span onclick="SetOrder('sortOrder');">优先排序</span></td>
                                <td>是否生效</td>
                                <td>
                                    <span onclick="SetOrder('createTime');">创建时间</span></td>
                                <td>
                                    操作</td>
                            </tr>
                           
                            <asp:Repeater ID="rptGoodsPromotion" runat="server" OnItemDataBound="rptGoodsPromotion_ItemDataBound" >
                                <ItemTemplate>
                                    <tbody>
                                        <tr>
                                            <td>
                                                <input id='cb<%# Eval("id") %>' name="Item" type="checkbox" onclick="ShowDelete();"
                                                    value='<%# Eval("id") %>' /></td>
                                            <td>
                                                <%# Eval("promotionTitle")%>
                                            </td>
                                            <td>
                                                <%# Eval("promotionType")%>
                                            </td>
                                              <td>
                                                <%# Eval("sortOrder")%>
                                            </td>
                                            <td>
                                             <asp:LinkButton ID='lbtIsOverlap' runat="server"
                                                        CommandArgument='<%#  Eval("id") %>' CommandName="isOverlap" Text='<%# Convert.ToInt32(Eval("isOverlap"))==0?"否":"是"%>'></asp:LinkButton>
                                            
                                            </td>
                                              <td>
                                                <%# Eval("createTime")%>
                                            </td>

                                            <td>
                                          <div style="float:left; display:block;" id="divEdit" runat="server">  <a  href="goodsPromotion.aspx?ot=ed&id=<%# Eval("id") %>"  title="编辑">[编辑]</a></div>
                                         <div style="float:left; display:block;" id="divDeleted" runat="server">  <a title="删除" href="goodsPromotionList.aspx?action=del&amp;id=<%# Eval("id") %>" onclick="javascript:return confirm('你确定要删除吗？');">[删除]</a></div>
                                      
                                            </td>
                                        </tr>
                                    </tbody>
                                </ItemTemplate>
                                <FooterTemplate>
                                    <tr>
                                        <td colspan="7" style="text-align: center;">
                                            <label id="lblEmpty" style='display: <%# rptGoodsPromotion.Items.Count==0?"block":"none"%>;
                                                color: Red;'>
                                                没有找到任何记录</label>
                                        </td>
                                    </tr>
                                </FooterTemplate>
                            </asp:Repeater>
                        </table>
                     <asp:Button ID="btnDelete" runat="server" Text="删除" OnClientClick="return confirm('确定要删除吗？');"
                            OnClick="btnDelete_Click" EnableViewState="false" CssClass="formButton" />
                        <% Response.Write((new Gift.WebApp.PageListNo()).DisplayPage(total, pageSize, pageIndex)); %>
                    </form>

                </div>
            </td>
          
        </tr>
    
    </table>
</body>
</html>
